package aau.client.ui;

import java.util.ArrayList;
import java.util.List;

import com.google.gwt.canvas.dom.client.Context2d;

public class Layer extends Actor {
    private List<Actor> children = new ArrayList<Actor>();

    public final void paint(Context2d c) {
        for (Actor eachActor : this.children) {
            c.save();
            eachActor.paint(c);
            c.restore();
        }
    }

    public boolean add(Actor e) {
        return this.children.add(e);
    }
}
